package com.hl.toolkit.server.tycoin.common.enums;

public enum MediaStatusEnum {
    OK(0, "正常"), MISS_IMAGE(10, "缺海报"), MISS_VIDEO(100, "缺视频"), DOWNLOAD(1000000, "下载中..."), DOWNLOAD_FAIL(10000000, "下载失败"), DOWNLOAD_PART_FAIL(100000000,
            "下载部分失败");

    int key;
    String value;

    MediaStatusEnum(int key, String value) {
        this.key = key;
        this.value = value;
    }

    public int getKey() {
        return key;
    }

    public void setKey(int key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public static MediaStatusEnum getEnumByKey(int key) {
        for (MediaStatusEnum objEnum : MediaStatusEnum.values()) {
            if (key == objEnum.getKey()) {
                return objEnum;
            }
        }
        return null;
    }

}
